package com.xyyhome.web.system.domain;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by ty850 on 2017/5/21.
 */
@Entity
@Table(name = "y_s_msg_see", schema = "xyyhome", catalog = "")
public class YSMsgSee {
    private String ysmsId;
    private String ysmsUserId;
    private String ysmsMsgId;
    private Timestamp ysmsSeeTime;

    @Id
    @Column(name = "ysms_id", nullable = false, length = 36)
    public String getYsmsId() {
        return ysmsId;
    }

    public void setYsmsId(String ysmsId) {
        this.ysmsId = ysmsId;
    }

    @Basic
    @Column(name = "ysms_user_id", nullable = true, length = 36)
    public String getYsmsUserId() {
        return ysmsUserId;
    }

    public void setYsmsUserId(String ysmsUserId) {
        this.ysmsUserId = ysmsUserId;
    }

    @Basic
    @Column(name = "ysms_msg_id", nullable = true, length = 36)
    public String getYsmsMsgId() {
        return ysmsMsgId;
    }

    public void setYsmsMsgId(String ysmsMsgId) {
        this.ysmsMsgId = ysmsMsgId;
    }

    @Basic
    @Column(name = "ysms_see_time", nullable = true)
    public Timestamp getYsmsSeeTime() {
        return ysmsSeeTime;
    }

    public void setYsmsSeeTime(Timestamp ysmsSeeTime) {
        this.ysmsSeeTime = ysmsSeeTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        YSMsgSee ysMsgSee = (YSMsgSee) o;

        if (ysmsId != null ? !ysmsId.equals(ysMsgSee.ysmsId) : ysMsgSee.ysmsId != null) return false;
        if (ysmsUserId != null ? !ysmsUserId.equals(ysMsgSee.ysmsUserId) : ysMsgSee.ysmsUserId != null) return false;
        if (ysmsMsgId != null ? !ysmsMsgId.equals(ysMsgSee.ysmsMsgId) : ysMsgSee.ysmsMsgId != null) return false;
        if (ysmsSeeTime != null ? !ysmsSeeTime.equals(ysMsgSee.ysmsSeeTime) : ysMsgSee.ysmsSeeTime != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = ysmsId != null ? ysmsId.hashCode() : 0;
        result = 31 * result + (ysmsUserId != null ? ysmsUserId.hashCode() : 0);
        result = 31 * result + (ysmsMsgId != null ? ysmsMsgId.hashCode() : 0);
        result = 31 * result + (ysmsSeeTime != null ? ysmsSeeTime.hashCode() : 0);
        return result;
    }
}
